<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>电影精品地区分布图</title>
    <script src="./js/echarts.js"></script>
    <script src="./js/world.js"></script>

</head>
<body>
    <div id="main" style="width: 1440px; height: 720px;"></div>
    <script>

        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));


        // 指定图表的配置项和数据
        myChart.setOption(option = {
            title: {
                text: '电影精品地区分布图',
                subtext: '好电影地区分布',

            },
            tooltip: {
                trigger: 'item',
                formatter: '{b}<br/>{c} 部'
            },
            toolbox: {
                show: true,
                orient: 'vertical',
                left: 'right',
                top: 'center',
                feature: {
                    dataView: {readOnly: false},
                    restore: {},
                    saveAsImage: {}
                }
            },
            visualMap: {
                min: 0,
                max: 450,
                text: ['High', 'Low'],
                realtime: false,
                calculable: true,
                inRange: {
                    color: ['lightskyblue', 'yellow', 'orangered']
                }
            },
            series: [
                {
                    name: '香港18区人口密度',
                    type: 'map',
                    mapType: 'world', // 自定义扩展图表类型
                    label: {
                        textStyle:{
                            fontSize:16,
                            color:'#0d0f8a'
                        }
                    },
                    data: [
                        {"name":"中国香港","value":50},
                        {"name":"俄罗斯","value":8},
                        {"name":"瑞士","value":13},
                        {"name":"冰岛","value":1},
                        {"name":"韩国","value":29},
                        {"name":"奥地利","value":8},
                        {"name":"波黑","value":2},
                        {"name":"加拿大","value":15},
                        {"name":"卢森堡","value":1},
                        {"name":"黎巴嫩","value":1},
                        {"name":"USA","value":1},
                        {"name":"丹麦","value":6},
                        {"name":"意大利","value":63},
                        {"name":"阿尔及利亚","value":2},
                        {"name":"乌克兰","value":1},
                        {"name":"东德","value":1},
                        {"name":"阿根廷","value":3},
                        {"name":"乌拉圭","value":1},
                        {"name":"斯洛文尼亚","value":1},
                        {"name":"挪威","value":2},
                        {"name":"泰国","value":1},
                        {"name":"马耳他","value":1},
                        {"name":"新西兰","value":5},
                        {"name":"伊拉克","value":1},
                        {"name":"波兰","value":9},
                        {"name":"南非","value":5},
                        {"name":"捷克斯洛伐克","value":2},
                        {"name":"摩洛哥","value":2},
                        {"name":"匈牙利","value":3},
                        {"name":"日本","value":240,"label":{"show":true}},
                        {"name":"尼泊尔","value":1},
                        {"name":"保加利亚","value":1},
                        {"name":"葡萄牙","value":1},
                        {"name":"英国","value":135,"label":{"show":true}},
                        {"name":"阿联酋","value":1},
                        {"name":"巴西","value":4},
                        {"name":"西班牙","value":17},
                        {"name":"澳大利亚","value":10},
                        {"name":"希腊","value":5},
                        {"name":"北马其顿","value":1},
                        {"name":"中国台湾","value":25},
                        {"name":"瑞典","value":12},
                        {"name":"墨西哥","value":4},
                        {"name":"秘鲁","value":1},
                        {"name":"中国","value":43,"label":{"show":true}},
                        {"name":"德国","value":57},
                        {"name":"苏联","value":14},
                        {"name":"南斯拉夫","value":8},
                        {"name":"法国","value":118,"label":{"show":true}},
                        {"name":"印度","value":10},
                        {"name":"西德","value":15},
                        {"name":"土耳其","value":1},
                        {"name":"塞尔维亚和黑山","value":1},
                        {"name":"捷克","value":3},
                        {"name":"荷兰","value":1},
                        {"name":"伊朗","value":6},
                        {"name":"美国","value":348,"label":{"show":true}},
                        {"name":"比利时","value":10},
                        {"name":"博茨瓦纳","value":2},
                        {"name":"阿尔巴尼亚","value":1},
                        {"name":"芬兰","value":2},
                        {"name":"罗马尼亚","value":3},
                        {"name":"爱尔兰","value":6},
                        {"name":"卡塔尔","value":1},
                        {"name":"塞浦路斯","value":1},
                    ],
                    // 自定义名称映射
                    nameMap: {

                        "Afghanistan":"阿富汗",
                        "Aland Islands":"奥兰群岛",
                        "Albania":"阿尔巴尼亚",
                        "Algeria":"阿尔及利亚",
                        "American Samoa":"美属萨摩亚",
                        "Andorra":"安道尔",
                        "Angola":"安哥拉",
                        "Anguilla":"安圭拉",
                        "Antigua and Barbuda":"安提瓜和巴布达",
                        "Argentina":"阿根廷",
                        "Armenia":"亚美尼亚",
                        "Aruba":"阿鲁巴",
                        "Australia":"澳大利亚",
                        "Austria":"奥地利",
                        "Azerbaijan":"阿塞拜疆",
                        "Bangladesh":"孟加拉",
                        "Bahrain":"巴林",
                        "Bahamas":"巴哈马",
                        "Barbados":"巴巴多斯",
                        "Belarus":"白俄罗斯",
                        "Belgium":"比利时",
                        "Belize":"伯利兹",
                        "Benin":"贝宁",
                        "Bermuda":"百慕大",
                        "Bhutan":"不丹",
                        "Bolivia":"玻利维亚",
                        "Bosnia and Herzegovina":"波斯尼亚和黑塞哥维那",
                        "Botswana":"博茨瓦纳",
                        "Bouvet Island":"布维岛",
                        "Brazil":"巴西",
                        "Brunei":"文莱",
                        "Bulgaria":"保加利亚",
                        "Burkina Faso":"布基纳法索",
                        "Burundi":"布隆迪",
                        "Cambodia":"柬埔寨",
                        "Cameroon":"喀麦隆",
                        "Canada":"加拿大",
                        "Cape Verde":"佛得角",
                        "Central African Republic":"中非",
                        "Chad":"乍得",
                        "Chile":"智利",
                        "Christmas Islands":"圣诞岛",
                        "Cocos (keeling) Islands":"科科斯（基林）群岛",
                        "Colombia":"哥伦比亚",
                        "Comoros":"科摩罗",
                        "Congo (Congo-Kinshasa)":"刚果（金）",
                        "Congo":"刚果",
                        "Cook Islands":"库克群岛",
                        "Costa Rica":"哥斯达黎加",
                        "Cote D’Ivoire":"科特迪瓦",
                        "China":"中国",
                        "Croatia":"克罗地亚",
                        "Cuba":"古巴",
                        "Czech":"捷克",
                        "Cyprus":"塞浦路斯",
                        "Denmark":"丹麦",
                        "Djibouti":"吉布提",
                        "Dominica":"多米尼加",
                        "East Timor":"东帝汶",
                        "Ecuador":"厄瓜多尔",
                        "Egypt":"埃及",
                        "Equatorial Guinea":"赤道几内亚",
                        "Eritrea":"厄立特里亚",
                        "Estonia":"爱沙尼亚",
                        "Ethiopia":"埃塞俄比亚",
                        "Faroe Islands":"法罗群岛",
                        "Fiji":"斐济",
                        "Finland":"Finland",
                        "France":"法国",
                        "Franch Metropolitan":"法国大都会",
                        "Franch Guiana":"法属圭亚那",
                        "French Polynesia":"法属波利尼西亚",
                        "Gabon":"加蓬",
                        "Gambia":"冈比亚",
                        "Georgia":"格鲁吉亚",
                        "Germany":"德国",
                        "Ghana":"加纳",
                        "Gibraltar":"直布罗陀",
                        "Greece":"希腊",
                        "Grenada":"格林纳达",
                        "Guadeloupe":"瓜德罗普岛",
                        "Guam":"关岛",
                        "Guatemala":"危地马拉",
                        "Guernsey":"根西岛",
                        "Guinea-Bissau":"几内亚比绍",
                        "Guinea":"几内亚",
                        "Guyana":"圭亚那",
                        "Hong Kong":"中国香港",
                        "Haiti":"海地",
                        "Honduras":"洪都拉斯",
                        "Hungary":"匈牙利",
                        "Iceland":"冰岛",
                        "India":"印度",
                        "Indonesia":"印度尼西亚",
                        "Iran":"伊朗",
                        "Iraq":"伊拉克",
                        "Ireland":"爱尔兰",
                        "Isle of Man":"马恩岛",
                        "Israel":"以色列",
                        "Italy":"意大利",
                        "Jamaica":"牙买加",
                        "Japan":"日本",
                        "Jersey":"泽西岛",
                        "Jordan":"约旦",
                        "Kazakhstan":"哈萨克斯坦",
                        "Kenya":"肯尼亚",
                        "Kiribati":"基里巴斯",
                        "Korea (South)":"韩国",
                        "Korea (North)":"朝鲜",
                        "Kuwait":"科威特",
                        "Kyrgyzstan":"吉尔吉斯斯坦",
                        "Laos":"老挝",
                        "Latvia":"拉脱维亚",
                        "Lebanon":"黎巴嫩",
                        "Lesotho":"莱索托",
                        "Liberia":"利比里亚",
                        "Libya":"利比亚",
                        "Liechtenstein":"列支敦士登",
                        "Lithuania":"立陶宛",
                        "Luxembourg":"卢森堡",
                        "Macau":"中国澳门",
                        "Macedonia":"马其顿",
                        "Malawi":"马拉维",
                        "Malaysia":"马来西亚",
                        "Madagascar":"马达加斯加",
                        "Maldives":"马尔代夫",
                        "Mali":"马里",
                        "Malta":"马耳他",
                        "Marshall Islands":"马绍尔群岛",
                        "Martinique":"马提尼克岛",
                        "Mauritania":"毛里塔尼亚",
                        "Mauritius":"毛里求斯",
                        "Mayotte":"马约特",
                        "Mexico":"墨西哥",
                        "Micronesia":"密克罗尼西亚",
                        "Moldova":"摩尔多瓦",
                        "Monaco":"摩纳哥",
                        "Mongolia":"蒙古",
                        "Montenegro":"黑山",
                        "Montserrat":"蒙特塞拉特",
                        "Morocco":"摩洛哥",
                        "Mozambique":"莫桑比克",
                        "Myanmar":"缅甸",
                        "Namibia":"纳米比亚",
                        "Nauru":"瑙鲁",
                        "Nepal":"尼泊尔",
                        "Netherlands":"荷兰",
                        "New Caledonia":"新喀里多尼亚",
                        "New Zealand":"新西兰",
                        "Nicaragua":"尼加拉瓜",
                        "Niger":"尼日尔",
                        "Nigeria":"尼日利亚",
                        "Niue":"纽埃",
                        "Norfolk Island":"诺福克岛",
                        "Norway":"挪威",
                        "Oman":"阿曼",
                        "Pakistan":"巴基斯坦",
                        "Palau":"帕劳",
                        "Palestine":"巴勒斯坦",
                        "Panama":"巴拿马",
                        "Papua New Guinea":"巴布亚新几内亚",
                        "Paraguay":"巴拉圭",
                        "Peru":"秘鲁",
                        "Philippines":"菲律宾",
                        "Pitcairn Islands":"皮特凯恩群岛",
                        "Poland":"波兰",
                        "Portugal":"葡萄牙",
                        "Puerto Rico":"波多黎各",
                        "Qatar":"卡塔尔",
                        "Reunion":"留尼汪岛",
                        "Romania":"罗马尼亚",
                        "Rwanda":"卢旺达",
                        "Russian Federation":"俄罗斯联邦",
                        "Saint Helena":"圣赫勒拿",
                        "Saint Kitts-Nevis":"圣基茨和尼维斯",
                        "Saint Lucia":"圣卢西亚",
                        "Saint Vincent and the Grenadines":"圣文森特和格林纳丁斯",
                        "El Salvador":"萨尔瓦多",
                        "Samoa":"萨摩亚",
                        "San Marino":"圣马力诺",
                        "Sao Tome and Principe":"圣多美和普林西比",
                        "Saudi Arabia":"沙特阿拉伯",
                        "Senegal":"塞内加尔",
                        "Seychelles":"塞舌尔",
                        "Sierra Leone":"塞拉利昂",
                        "Singapore":"新加坡",
                        "Serbia":"塞尔维亚",
                        "Slovakia":"斯洛伐克",
                        "Slovenia":"斯洛文尼亚",
                        "Solomon Islands":"所罗门群岛",
                        "Somalia":"索马里",
                        "South Africa":"南非",
                        "Spain":"西班牙",
                        "Sri Lanka":"斯里兰卡",
                        "Sudan":"苏丹",
                        "Suriname":"苏里南",
                        "Swaziland":"斯威士兰",
                        "Sweden":"瑞典",
                        "Switzerland":"瑞士",
                        "Syria":"叙利亚",
                        "Tajikistan":"塔吉克斯坦",
                        "Tanzania":"坦桑尼亚",
                        "Taiwan":"中国台湾",
                        "Thailand":"泰国",
                        "Trinidad and Tobago":"特立尼达和多巴哥",
                        "Timor-Leste":"东帝汶",
                        "Togo":"多哥",
                        "Tokelau":"托克劳",
                        "Tonga":"汤加",
                        "Tunisia":"突尼斯",
                        "Turkey":"土耳其",
                        "Turkmenistan":"土库曼斯坦",
                        "Tuvalu":"图瓦卢",
                        "Uganda":"乌干达",
                        "Ukraine":"乌克兰",
                        "United Arab Emirates":"阿拉伯联合酋长国",
                        "United Kingdom":"英国",
                        "United States":"美国",
                        "Uruguay":"乌拉圭",
                        "Uzbekistan":"乌兹别克斯坦",
                        "Vanuatu":"瓦努阿图",
                        "Vatican City":"梵蒂冈",
                        "Venezuela":"委内瑞拉",
                        "Vietnam":"越南",
                        "Wallis and Futuna":"瓦利斯群岛和富图纳群岛",
                        "Western Sahara":"西撒哈拉",
                        "Yemen":"也门",
                        "Yugoslavia":"南斯拉夫",
                        "Zambia":"赞比亚",
                        "Zimbabwe":"津巴布韦"
                    }
                }
            ]
        });


    </script>
</body>
</html>